<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        
        <link rel="canonical" href="https://www.angular-gantt.com/plugins/table/">
        <link rel="shortcut icon" href="../../img/favicon.ico">

        <title>Table - angular-gantt</title>

        <link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="../../css/font-awesome-4.0.3.css" rel="stylesheet">
        <link href="../../css/prettify-1.0.css" rel="stylesheet">
        <link href="../../css/base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>

    <body>

        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">

        <!-- Collapsed navigation -->
        <div class="navbar-header">
            <!-- Expander button -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <!-- Main title -->
            <a class="navbar-brand" href="../..">angular-gantt</a>
        </div>

        <!-- Expanded navigation -->
        <div class="navbar-collapse collapse">
            <!-- Main navigation -->
            <ul class="nav navbar-nav">
            
            
                <li >
                    <a href="../../get-started">Get Started</a>
                </li>
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Configuration <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="../../configuration/data">Data</a>
                        </li>
                    
                        <li >
                            <a href="../../configuration/timespans">Timespans</a>
                        </li>
                    
                        <li >
                            <a href="../../configuration/attributes">Attributes</a>
                        </li>
                    
                        <li >
                            <a href="../../configuration/plugins">Plugins</a>
                        </li>
                    
                        <li >
                            <a href="../../configuration/customize">Customize</a>
                        </li>
                    
                        <li >
                            <a href="../../configuration/api">API</a>
                        </li>
                    
                        <li >
                            <a href="../../configuration/write_plugin">Write a Plugin</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li class="dropdown active">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Plugins <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        <li >
                            <a href="../labels">Labels</a>
                        </li>
                    
                        <li class="active">
                            <a href=".">Table</a>
                        </li>
                    
                        <li >
                            <a href="../tree">Tree</a>
                        </li>
                    
                        <li >
                            <a href="../corner">Corner</a>
                        </li>
                    
                        <li >
                            <a href="../groups">Groups</a>
                        </li>
                    
                        <li >
                            <a href="../dependencies">Dependencies</a>
                        </li>
                    
                        <li >
                            <a href="../sortable">Sortable</a>
                        </li>
                    
                        <li >
                            <a href="../movable">Movable</a>
                        </li>
                    
                        <li >
                            <a href="../drawtask">Draw Task</a>
                        </li>
                    
                        <li >
                            <a href="../tooltips">Tooltips</a>
                        </li>
                    
                        <li >
                            <a href="../bounds">Bounds</a>
                        </li>
                    
                        <li >
                            <a href="../sections">Sections</a>
                        </li>
                    
                        <li >
                            <a href="../progress">Progress</a>
                        </li>
                    
                        <li >
                            <a href="../overlap">Overlap</a>
                        </li>
                    
                        <li >
                            <a href="../resizeSensor">Resize Sensor</a>
                        </li>
                    
                    </ul>
                </li>
            
            
            
                <li >
                    <a href="../../sources">Sources</a>
                </li>
            
            
            
                <li >
                    <a href="../../contribute">Contribute</a>
                </li>
            
            
            
                <li >
                    <a href="../../faq">FAQ</a>
                </li>
            
            
            
                <li >
                    <a href="../../about">About</a>
                </li>
            
            
            </ul>

            <!-- Search, Navigation and Repo links -->
            <ul class="nav navbar-nav navbar-right">
                
                <li >
                    <a rel="next" href="../labels">
                        <i class="fa fa-arrow-left"></i> Previous
                    </a>
                </li>
                <li >
                    <a rel="prev" href="../tree">
                        Next <i class="fa fa-arrow-right"></i>
                    </a>
                </li>
                
                <li>
                    <a href="https://github.com/angular-gantt/angular-gantt">
                        
                            <i class="fa fa-github"></i>
                        
                        GitHub
                    </a>
                </li>
                
            </ul>
        </div>
    </div>
</div>

        <div class="container">
            <div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
    <ul class="nav bs-sidenav">
    
        <li class="main active"><a href="#table">Table</a></li>
        
            <li><a href="#usage">Usage</a></li>
        
            <li><a href="#attributes">Attributes</a></li>
        
    
    </ul>
</div></div>
            <div class="col-md-9" role="main">

<h1 id="table">Table</h1>
<p>Display a table on the side with fully customizable columns count and data.</p>
<h2 id="usage">Usage</h2>
<pre><code>angular.module('myApp', ['gantt', 'gantt.table']);
</code></pre>
<!-- -->

<pre><code>&lt;div gantt&gt;
  &lt;gantt-table enabled="..."&gt;
  &lt;/gantt-table&gt;
&lt;/div&gt;
</code></pre>
<h2 id="attributes">Attributes</h2>
<ul>
<li>
<h4 id="enabled">enabled</h4>
<p>Enable display of table.</p>
<p>default: <code>true</code></p>
</li>
<li>
<h4 id="columns">columns</h4>
<p>List of row expressions that will be used to build columns. Those expression will provide values for each row.</p>
<p>default: <code>['model.name']</code></p>
</li>
<li>
<h4 id="formatter">formatter</h4>
<p>Function <code>formatter(value, column, row)</code> used to format each value. The function returns formatted value.</p>
<p>default: <code>{'model.name': 'Name'}</code></p>
</li>
<li>
<h4 id="formatters">formatters</h4>
<p>Associative object to customize formatter for each cell. 
Key is the column expression defined in <code>columns</code> attribute, and value is a formatter function <code>formatter(value, column, row)</code>
returning formatted value.
It can be used if some columns requires special formatters. If a formatter is undefined for the column, it will use then formatter 
defined in <code>formatter</code> attribute</p>
<pre><code>{'from': function(value, column, row) {
  if (value) {
    return value.format('lll');
  }
  return value;
  }
}
</code></pre>
</li>
<li>
<h4 id="headers">headers</h4>
<p>Associative object to customize header for each column. Key is the column expression defined in <code>columns</code> attribute,
and value is the header to display.</p>
<p>ex: <code>{'model.name': 'Label'}</code></p>
</li>
<li>
<h4 id="contents">contents</h4>
<p>Associative object to customize values content. Key is the column expression defined in <code>columns</code> attribute,
and value is the content to display for each column row. Content can contain HTML and will be automatically 
compiled. Default content is <code>{{getValue()}}</code>.</p>
<p>ex: <code>{'model.name': '&lt;span class="glyphicon glyphicon-asterisk"&gt;&lt;/span&gt; {{getValue()}}'}</code></p>
<p>Contents object can also be be defined for a specific <code>Row</code> object using an object property named <code>columnContents</code></p>
<pre><code>{
  ...
  // Inside Row object
  'columnContents': {
    'model.name': '...',
    'from': '...',
    'to': '...'
  }
}
</code></pre>
</li>
<li>
<h4 id="header-contents">header-contents</h4>
<p>Associative object to customize header content. Key is the column expression defined in <code>columns</code> attribute,
and value is the content to display for each column row. Content can contain HTML and will be automatically 
compiled. Default content is <code>{{getHeader()}}</code>.</p>
<p>ex: <code>{'model.name': '&lt;span class="glyphicon glyphicon-asterisk"&gt;&lt;/span&gt; {{getHeader()}}'}</code></p>
</li>
<li>
<h4 id="classes">classes</h4>
<p>Associative object to customize CSS classes. Key is the column expression defined in <code>columns</code> attribute,
and value is the class name to apply to column.</p>
<p>ex: <code>{'model.name': 'gantt-column-name'}</code></p>
</li>
<li>
<h4 id="header-formatter">header-formatter</h4>
<p>Formatter function <code>formatter(column)</code> use to format each header. The function returns formatted header value.</p>
</li>
</ul>
</div>
        </div>

        

        <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
        <script src="../../js/bootstrap-3.0.3.min.js"></script>
        <script src="../../js/prettify-1.0.min.js"></script>
        <script src="../../js/base.js"></script>
        <script src="../../skeletons/plugin.js"></script>
    </body>
</html>